void setup(){
  pinMode(5, INPUT);
  digitalWrite(5,HIGH);
  pinMode(4, OUTPUT);
}
void loop(){
  if (digitalRead(5) == LOW) {
                      //20ms消抖
    if (digitalRead(5) == LOW) {
      digitalWrite(4,HIGH);
    }
  }
  if (digitalRead(5) == HIGH) {                               //消抖
    if (digitalRead(5) == HIGH) {
      digitalWrite(4,LOW);
    }
  }
}
